package com.my.ddd_sample_collections.aggregate_change_tracking.repository_framework;

import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.sql.Timestamp;

@SuperBuilder
@NoArgsConstructor
public class PersistenceObjectSupport implements PersistenceObject {
    private String tableName;
    @Builder.Default
    private int version = NEW_VERSION;
    private Timestamp timestamp;
    
    @Override
    public int getVersion() {
        return version;
    }
    
    @Override
    public void setVersion(int version) {
        this.version = version;
    }
    
    public String getTableName() {
        return tableName;
    }
    
    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    
    @Override
    public Timestamp getLastModified() {
        return this.timestamp;
    }
    
    @Override
    public void setLastModified(Timestamp timestamp) {
        this.timestamp = timestamp;
    }
}


